package com.twu.biblioteca.controller;

import com.twu.biblioteca.library.Library;
import com.twu.biblioteca.Security;
import com.twu.biblioteca.User;

import java.io.PrintStream;

/**
 * Created with IntelliJ IDEA.
 * User: Thoughtworker
 * Date: 8/25/13
 * Time: 10:44 PM
 * To change this template use File | Settings | File Templates.
 */
public class MembershipController extends Controller {

    public MembershipController(Security security, Library library, PrintStream printStream) {
        this.security = security;
        this.library = library;
        this.printStream = printStream;
    }

    public void checkMembership() {
        User loggedUser = security.getLoggedUser();
        if(loggedUser == null)
            printStream.println("Please talk to a librarian. Thank You.");
        else
            printStream.println(loggedUser);
    }
}
